package Interpreter_Pattern.Simple;

// -*-coding:utf-8 -*-
//人员：刘陆鑫
//班级：19软3
//学号；2019110218
public class OrNode extends AbstractNode{
    private AbstractNode left;
    private AbstractNode right;
    public OrNode(AbstractNode left,AbstractNode right){
        this.left=left;
        this.right=right;
    }

    @Override
    public int result() {
        if(left.result()==0&right.result()==0) {
            return 0;
        }
        else{
            return 1;
        }
    }
}
